import { createRouter, createWebHistory } from 'vue-router'
import user from './routes/user'
import home from './routes/home'
import market from './routes/market'
import deal from './routes/deal'
import assets from './routes/assets'
import profile from './routes/profile'

export const routes = [
  // 重定向
  {
    path: '/',
    redirect: "/home"
  },
  // 登录注册
  ...user,
  // 首页
  ...home,
  // 行情页
  ...market,
  // 交易页
  ...deal,
  // 资金页
  ...assets,
  // 个人主页
  ...profile
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})

export default router
